<template>
  <div>
    <h1>Child1- - {{count}}</h1>
  </div>
</template>

<script>
export default {
  name: "Child1",
  data(){
    return {
      count:0
    }
  },
  mounted(){
    this.$root.$on('getCount',(value)=>{
      this.count += value
    })
  }
};
</script>

<style>
</style>